An electronic device in which a phase detection pixel is provided in a part of a plurality of pixels arranged in a two-dimensionally matrix manner has been developed (for example, PTL 1). In the phase detection pixel, a part of a light receiving region is shielded by a light shielding film, and lens focus deviation can be detected from a signal output from the phase detection pixel.